home *** CD-ROM | disk | FTP | other *** search
- /* Picasso96.h -- include File
- * (C) Copyright 1996-98 Alexander Kneer & Tobias Abt
- * All Rights Reserved.
- */
- /************************************************************************/
- /* includes
- */
- MODULE 'exec/nodes',
- 'utility/tagitem'
-
- /************************************************************************/
- /* This is the name of the library
- */
- #define P96NAME 'Picasso96API.library'
-
- /************************************************************************/
- /* Types for RGBFormat used
- */
- FLAG RGBF_NONE, /* no valid RGB format (should not happen) */
- RGBF_CLUT, /* palette mode, set colors when opening screen using
- tags or use SetRGB32/LoadRGB32(...) */
- RGBF_R8G8B8, /* TrueColor RGB (8 bit each) */
- RGBF_B8G8R8, /* TrueColor BGR (8 bit each) */
- RGBF_R5G6B5PC, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: gggbbbbbrrrrrggg */
- RGBF_R5G5B5PC, /* HiColor15 (5 bit each), format: gggbbbbb0rrrrrgg */
- RGBF_A8R8G8B8, /* 4 Byte TrueColor ARGB (A unused alpha channel) */
- RGBF_A8B8G8R8, /* 4 Byte TrueColor ABGR (A unused alpha channel) */
- RGBF_R8G8B8A8, /* 4 Byte TrueColor RGBA (A unused alpha channel) */
- RGBF_B8G8R8A8, /* 4 Byte TrueColor BGRA (A unused alpha channel) */
- RGBF_R5G6B5, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: rrrrrggggggbbbbb */
- RGBF_R5G5B5, /* HiColor15 (5 bit each), format: 0rrrrrgggggbbbbb */
- RGBF_B5G6R5PC, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
- format: gggrrrrrbbbbbggg */
- RGBF_B5G5R5PC, /* HiColor15 (5 bit each), format: gggrrrrr0bbbbbbgg */
-
- /* By now, the following formats are for use with a hardware window only
- (bitmap operations may be implemented incompletely) */
-
- RGBF_Y4U2V2, /* 2 Byte TrueColor YUV (CCIR recommendation CCIR601).
- Each two-pixel unit is stored as one longword
- containing luminance (Y) for each of the two pixels,
- and chrominance (U,V) for alternate pixels.
- The missing chrominance values are generated by
- interpolation. (Y1-U0-Y0-V0) */
- RGBF_Y4U1V1, /* 1 Byte TrueColor ACCUPAK. Four adjacent pixels form
- a packet of 5 bits Y (luminance) each pixel and 6 bits
- U and V (chrominance) shared by the four pixels */
- RGBF_MaxFormats
-
- CONST RGBFF_HICOLOR=RGBFF_R5G6B5PC|RGBFF_R5G5B5PC|RGBFF_R5G6B5|RGBFF_R5G5B5|RGBFF_B5G6R5PC|RGBFF_B5G5R5PC,
- RGBFF_TRUECOLOR=RGBFF_R8G8B8|RGBFF_B8G8R8,
- RGBFF_TRUEALPHA=RGBFF_A8R8G8B8|RGBFF_A8B8G8R8|RGBFF_R8G8B8A8|RGBFF_B8G8R8A8
-
- /************************************************************************/
- /* Flags for p96AllocBitMap
- */
- CONST BMF_USERPRIVATE=$8000 /* private user bitmap that will never
- be put to a board, but may be used as a temporary render buffer and accessed
- with OS blit functions, too. Bitmaps allocated with this flag do not need to
- be locked. */
-
- /************************************************************************/
- /* Attributes for p96GetBitMapAttr
- */
- ENUM P96BMA_WIDTH,
- P96BMA_HEIGHT,
- P96BMA_DEPTH,
- P96BMA_MEMORY,
- P96BMA_BYTESPERROW,
- P96BMA_BYTESPERPIXEL,
- P96BMA_BITSPERPIXEL,
- P96BMA_RGBFORMAT,
- P96BMA_ISP96,
- P96BMA_ISONBOARD,
- P96BMA_BOARDMEMBASE,
- P96BMA_BOARDIOBASE,
- P96BMA_BOARDMEMIOBASE
-
- /************************************************************************/
- /* Attributes for p96GetModeIDAttr
- */
- ENUM P96IDA_WIDTH,
- P96IDA_HEIGHT,
- P96IDA_DEPTH,
- P96IDA_BYTESPERPIXEL,
- P96IDA_BITSPERPIXEL,
- P96IDA_RGBFORMAT,
- P96IDA_ISP96,
- P96IDA_BOARDNUMBER,
- P96IDA_STDBYTESPERROW,
- P96IDA_BOARDNAME,
- P96IDA_COMPATIBLEFORMATS,
- P96IDA_VIDEOCOMPATIBLE,
- P96IDA_PABLOIVCOMPATIBLE,
- P96IDA_PALOMAIVCOMPATIBLE
-
- /************************************************************************/
- /* Tags for p96BestModeIDTagList
- */
- CONST P96BIDTAG_Dummy =TAG_USER + 96,
- P96BIDTAG_FormatsAllowed =P96BIDTAG_Dummy + $0001,
- P96BIDTAG_FormatsForbidden =P96BIDTAG_Dummy + $0002,
- P96BIDTAG_NominalWidth =P96BIDTAG_Dummy + $0003,
- P96BIDTAG_NominalHeight =P96BIDTAG_Dummy + $0004,
- P96BIDTAG_Depth =P96BIDTAG_Dummy + $0005,
- P96BIDTAG_VideoCompatible =P96BIDTAG_Dummy + $0006,
- P96BIDTAG_PabloIVCompatible =P96BIDTAG_Dummy + $0007,
- P96BIDTAG_PalomaIVCompatible =P96BIDTAG_Dummy + $0008
-
- /************************************************************************/
- /* Tags for p96RequestModeIDTagList
- */
- CONST P96MA_Dummy =TAG_USER + $10000 + 96,
- P96MA_MinWidth =P96MA_Dummy + $0001,
- P96MA_MinHeight =P96MA_Dummy + $0002,
- P96MA_MinDepth =P96MA_Dummy + $0003,
- P96MA_MaxWidth =P96MA_Dummy + $0004,
- P96MA_MaxHeight =P96MA_Dummy + $0005,
- P96MA_MaxDepth =P96MA_Dummy + $0006,
- P96MA_DisplayID =P96MA_Dummy + $0007,
- P96MA_FormatsAllowed =P96MA_Dummy + $0008,
- P96MA_FormatsForbidden =P96MA_Dummy + $0009,
- P96MA_WindowTitle =P96MA_Dummy + $000a,
- P96MA_OKText =P96MA_Dummy + $000b,
- P96MA_CancelText =P96MA_Dummy + $000c,
- P96MA_Window =P96MA_Dummy + $000d,
- P96MA_PubScreenName =P96MA_Dummy + $000e,
- P96MA_Screen =P96MA_Dummy + $000f,
- P96MA_VideoCompatible =P96MA_Dummy + $0010,
- P96MA_PabloIVCompatible =P96MA_Dummy + $0011,
- P96MA_PalomaIVCompatible =P96MA_Dummy + $0012
-
- /************************************************************************/
- /* Tags for p96OpenScreenTagList
- */
- CONST P96SA_Dummy =TAG_USER + $20000 + 96,
- P96SA_Left =P96SA_Dummy + $0001,
- P96SA_Top =P96SA_Dummy + $0002,
- P96SA_Width =P96SA_Dummy + $0003,
- P96SA_Height =P96SA_Dummy + $0004,
- P96SA_Depth =P96SA_Dummy + $0005,
- P96SA_DetailPen =P96SA_Dummy + $0006,
- P96SA_BlockPen =P96SA_Dummy + $0007,
- P96SA_Title =P96SA_Dummy + $0008,
- P96SA_Colors =P96SA_Dummy + $0009,
- P96SA_ErrorCode =P96SA_Dummy + $000a,
- P96SA_Font =P96SA_Dummy + $000b,
- P96SA_SysFont =P96SA_Dummy + $000c,
- P96SA_Type =P96SA_Dummy + $000d,
- P96SA_BitMap =P96SA_Dummy + $000e,
- P96SA_PubName =P96SA_Dummy + $000f,
- P96SA_PubSig =P96SA_Dummy + $0010,
- P96SA_PubTask =P96SA_Dummy + $0011,
- P96SA_DisplayID =P96SA_Dummy + $0012,
- P96SA_DClip =P96SA_Dummy + $0013,
- P96SA_ShowTitle =P96SA_Dummy + $0014,
- P96SA_Behind =P96SA_Dummy + $0015,
- P96SA_Quiet =P96SA_Dummy + $0016,
- P96SA_AutoScroll =P96SA_Dummy + $0017,
- P96SA_Pens =P96SA_Dummy + $0018,
- P96SA_SharePens =P96SA_Dummy + $0019,
- P96SA_BackFill =P96SA_Dummy + $001a,
- P96SA_Colors32 =P96SA_Dummy + $001b,
- P96SA_VideoControl =P96SA_Dummy + $001c,
- P96SA_RGBFormat =P96SA_Dummy + $001d,
- P96SA_NoSprite =P96SA_Dummy + $001e,
- P96SA_NoMemory =P96SA_Dummy + $001f,
- P96SA_RenderFunc =P96SA_Dummy + $0020,
- P96SA_SaveFunc =P96SA_Dummy + $0021,
- P96SA_UserData =P96SA_Dummy + $0022,
- P96SA_Alignment =P96SA_Dummy + $0023,
- P96SA_FixedScreen =P96SA_Dummy + $0024,
- P96SA_Exclusive =P96SA_Dummy + $0025,
- P96SA_ConstantBytesPerRow =P96SA_Dummy + $0026
-
- /************************************************************************/
- /*
- */
- CONST MODENAMELENGTH=48
-
- OBJECT P96Mode
- Node:Node,
- Description[MODENAMELENGTH]:UBYTE,
- Width:UWORD,
- Height:UWORD,
- Depth:UWORD,
- DisplayID:ULONG
-
- /************************************************************************/
- /* Structure to describe graphics data
- *
- * short description of the entries:
- * Memory: pointer to graphics data
- * BytesPerRow: distance in bytes between one pixel and its neighbour up
- * or down.
- * pad: private, not used.
- * RGBFormat: RGBFormat of the data.
- */
- OBJECT RenderInfo
- Memory:PTR,
- BytesPerRow:WORD,
- pad:WORD,
- RGBFormat:LONG
-
- /************************************************************************/
- /* Structure for p96WriteTrueColorData() and p96ReadTrueColorData()
- *
- * short description of the entries:
- * PixelDistance: distance in bytes between the red (must be the same as
- * for the green or blue) component of one pixel and its
- * next neighbour to the left or right.
- * BytesPerRow: distance in bytes between the red (must be the same as
- * for the green or blue) component of one pixel and its
- * next neighbour up or down.
- * RedData: pointer to the red component of the upper left pixel.
- * GreenData, BlueData: the same as above.
- *
- * examples (for an array width of 640 pixels):
- * a) separate arrays for each color:
- * { 1, 640, red, green, blue };
- * b) plain 24 bit RGB data:
- * { 3, 640*3, array, array+1, array+2 };
- * c) 24 bit data, arranged as ARGB:
- * { 4, 640*4, array+1, array+2, array+3 };
- */
- OBJECT TrueColorInfo
- PixelDistance:ULONG,
- BytesPerRow:ULONG,
- RedData:PTR TO UBYTE,
- GreenData:PTR TO UBYTE,
- BlueData:PTR TO UBYTE
-
- /************************************************************************/
- /* Tags for PIPs
- */
- CONST P96PIP_Dummy =TAG_USER + $30000 + 96,
- P96PIP_SourceFormat =P96PIP_Dummy+1, /* RGBFTYPE (I) */
- P96PIP_SourceBitMap =P96PIP_Dummy+2, /* struct BitMap * (G) */
- P96PIP_SourceRPort =P96PIP_Dummy+3, /* struct RastPort * (G) */
- P96PIP_SourceWidth =P96PIP_Dummy+4, /* ULONG (I) */
- P96PIP_SourceHeight =P96PIP_Dummy+5, /* ULONG (I) */
- P96PIP_Type =P96PIP_Dummy+6, /* ULONG (I) default: PIPT_MemoryWindow */
- P96PIP_ErrorCode =P96PIP_Dummy+7, /* LONG* (I) */
- P96PIP_Brightness =P96PIP_Dummy+8, /* ULONG (IGS) default: 0 */
- P96PIP_Left =P96PIP_Dummy+9, /* ULONG (I) default: 0 */
- P96PIP_Top =P96PIP_Dummy+10, /* ULONG (I) default: 0 */
- P96PIP_Width =P96PIP_Dummy+11, /* ULONG (I) default: inner width of window */
- P96PIP_Height =P96PIP_Dummy+12, /* ULONG (I) default: inner height of window */
- P96PIP_Relativity =P96PIP_Dummy+13, /* ULONG (I) default: PIPRel_Width|PIPRel_Height */
- P96PIP_Colors =P96PIP_Dummy+14, /* struct ColorSpec * (IS)
- * ti_Data is an array of struct ColorSpec,
- * terminated by ColorIndex = -1. Specifies
- * initial screen palette colors.
- * Also see P96PIP_Colors32.
- * This only works with CLUT PIPs on non-CLUT
- * screens. For CLUT PIPs on CLUT screens the
- * PIP colors share the screen palette.
- */
- P96PIP_Colors32 =P96PIP_Dummy+15, /* ULONG* (IS)
- * Tag to set the palette colors at 32 bits-per-gun.
- * ti_Data is a pointer * to a table to be passed to
- * the graphics.library/LoadRGB32() function.
- * This format supports both runs of color
- * registers and sparse registers. See the
- * autodoc for that function for full details.
- * Any color set here has precedence over
- * the same register set by P96PIP_Colors.
- * This only works with CLUT PIPs on non-CLUT
- * screens. For CLUT PIPs on CLUT screens the
- * PIP colors share the screen palette.
- */
- P96PIP_NoMemory =P96PIP_Dummy+16,
- P96PIP_RenderFunc =P96PIP_Dummy+17,
- P96PIP_SaveFunc =P96PIP_Dummy+18,
- P96PIP_UserData =P96PIP_Dummy+19,
- P96PIP_Alignment =P96PIP_Dummy+20,
- P96PIP_ConstantBytesPerRow =P96PIP_Dummy+21,
- P96PIP_AllowCropping =P96PIP_Dummy+22,
- P96PIP_InitialIntScaling =P96PIP_Dummy+23
-
- ENUM PIPT_MemoryWindow, /* default */
- PIPT_VideoWindow,
- PIPT_NUMTYPES
- CONST P96PIPT_MemoryWindow =PIPT_MemoryWindow,
- P96PIPT_VideoWindow =PIPT_VideoWindow
-
- CONST PIPRel_Right =1, /* P96PIP_Left is relative to the right side (negative value) */
- PIPRel_Bottom =2, /* P96PIP_Top is relative to the bottom (negative value) */
- PIPRel_Width =4, /* P96PIP_Width is amount of pixels not used by PIP at the
- right side of the window (negative value) */
- PIPRel_Height =8 /* P96PIP_Height is amount of pixels not used by PIP at the
- window bottom (negative value) */
- CONST PIPERR_ATTACHFAIL =2, /* Failed to attach to a screen */
- PIPERR_NOTAVAILABLE =3, /* PIP not available for other reason */
- PIPERR_OUTOFPENS =4, /* couldn't get a free pen for occlusion */
- PIPERR_BADDIMENSIONS =5, /* type, width, height or format invalid */
- PIPERR_NOWINDOW =6, /* couldn't open window */
- PIPERR_BADALIGNMENT =7, /* specified alignment is not ok */
- PIPERR_CROPPED =8 /* pip would be cropped, but isn't allowed to */
-
- /************************************************************************/
- /* Tags for P96GetRTGDataTagList
- */
- CONST P96RD_Dummy =TAG_USER + $40000 + 96,
- P96RD_NumberOfBoards =P96RD_Dummy+1
-
- /************************************************************************/
- /* Tags for P96GetBoardDataTagList
- */
- CONST P96BD_Dummy =TAG_USER + $50000 + 96,
- P96BD_BoardName =P96BD_Dummy+1,
- P96BD_ChipName =P96BD_Dummy+2,
- P96BD_TotalMemory =P96BD_Dummy+4,
- P96BD_FreeMemory =P96BD_Dummy+5,
- P96BD_LargestFreeMemory =P96BD_Dummy+6,
- P96BD_MonitorSwitch =P96BD_Dummy+7,
- P96BD_RGBFormats =P96BD_Dummy+8,
- P96BD_MemoryClock =P96BD_Dummy+9
- /************************************************************************/
-